From fee4ddc4c2bb9b582955245ee3067f981cd618c9 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 18 Jun 2010 14:07:42 +0100 Subject: [PATCH] libxl: give reasons for ctx init failures Signed-off-by: Tim Deegan --- tools/libxl/libxl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index a2cd91a8f7..ebcdb3d040 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -51,12 +51,16 @@ int libxl_ctx_init(struct libxl_ctx *ctx, int version, xentoollog_logger *lg) ctx->xch = xc_interface_open(lg,lg,0); if (!ctx->xch) { + XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno, + "cannot open libxc handle"); free(ctx->alloc_ptrs); return ERROR_FAIL; } ctx->xsh = xs_daemon_open(); if (!ctx->xsh) { + XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno, + "cannot connect to xenstore"); xc_interface_close(ctx->xch); free(ctx->alloc_ptrs); return ERROR_FAIL; -- 2.30.2